package com.yaoben.exam.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yaoben.exam.dao.SubjectMapper;
import com.yaoben.exam.pojo.Subject;
import com.yaoben.exam.service.SubjectService;

@Service("subjectService")
public class SubjectServiceImpl implements SubjectService {
	
	@Autowired
	private SubjectMapper subjectMapper;

	@Override
	public Subject getSubjectById(int id) {
		return subjectMapper.selectByPrimaryKey(id);
	}
	
	// 根据题型id查询同一类型考题
	@Override
	public List<Subject> getSubjectByQuetypeid(int quetypeid) {
		return subjectMapper.selectByQuetypeId(quetypeid);
	}

}
